#pragma once

class MathVector
{
private:
	double x,y,z;
	
public:
	MathVector();
	MathVector(const MathVector &a);
	MathVector(double x, double y, double z);
	~MathVector();
	
	MathVector& set(const MathVector &a);
	MathVector& set(double x,double y,double z);
    MathVector& set(double vecAry[]);
	MathVector& setX(double x);
	MathVector& setY(double y);
	MathVector& setZ(double z);
	double getX() const;
	double getY() const;
	double getZ() const;
	bool eq(const MathVector &a) const;
	bool neq(const MathVector &a) const;
	double magnitude() const;
    double length() const;
    MathVector& zero();
	
	//math
	MathVector& addSelf(const MathVector &a);
	MathVector add(const MathVector &a) const;
	MathVector& subSelf(const MathVector &a);
	MathVector sub(const MathVector &a) const;
	MathVector& multiplySelf(double a);
	MathVector multiply(double a) const;
	MathVector& divideSelf(double a);
	MathVector divide(double a) const;
	MathVector& dotSelf(const MathVector &a);
	MathVector dot(const MathVector &a) const;
	MathVector& crossSelf(const MathVector &a);
	MathVector cross(const MathVector &a) const;
	
	//operator overloads
	MathVector& operator+=(const MathVector &a);
	MathVector& operator-=(const MathVector &a);
	MathVector& operator*=(const MathVector &dotV);
	MathVector& operator*=(double magnitude);
	MathVector& operator/=(const MathVector &crossV);
	MathVector& operator/=(double magnitude);
	MathVector operator+(const MathVector &a) const;
	MathVector operator-(const MathVector &a) const;
	MathVector operator*(const MathVector &dotV) const;
	MathVector operator*(double magnitude) const;
	MathVector operator/(const MathVector &crossV) const;
	MathVector operator/(double magnitude) const;
	bool operator==(const MathVector &a) const;
	bool operator!=(const MathVector &a) const;
};
